Skip to content

Conversation

@jakubuid
Copy link
Contributor

@jakubuid jakubuid commented Feb 9, 2026

Summary

  • Replace native field-by-field data collection with WebView-based approach across all 17 documentation files
  • CollectDataAction model now uses url (WebView URL) and schema (JSON schema) instead of fields array
  • confirmPayment() no longer requires collectedData parameter when WebView is used — the WebView submits data directly
  • New PaymentResultInfo model added to ConfirmPaymentResponse with txId and optionAmount
  • New FAQ entries added to wallet overview covering custom UI vs. WebView trade-offs and pre-filling customer information

Files Changed

Category Files Count
New shared snippets snippets/webview-data-collection-*.mdx 3
Standalone SDK docs payments/wallets/standalone/{kotlin,swift,react-native,flutter}.mdx 4
WalletKit SDK docs payments/wallets/walletkit/{kotlin,swift,flutter,web}.mdx 4
AI prompts payments/wallets/walletkit/ai-prompts/{kotlin,swift,flutter,react-native}.mdx 4
Overview & API-first payments/wallets/{overview,api-first}.mdx 2

What changed in each doc

flowchart TD
    A[Payment Options Response] --> B{collectDataAction.url present?}
    B -->|Yes| C[Display WebView]
    B -->|No| D[Skip to Confirm]
    C --> E[User fills form in WebView]
    E --> F{JS Bridge Message}
    F -->|IC_COMPLETE| G[Proceed to confirmPayment - no collectedData needed]
    F -->|IC_ERROR| H[Show error, allow retry]
    G --> I[Payment Complete]
Loading
  • Mermaid sequence diagrams: Updated to show WebView participant in data collection flow
  • "Collect User Data" step: Replaced with WebView URL loading + prefill mechanism
  • WebView Implementation section: Added platform-specific code (Android WebView, iOS WKWebView, Flutter webview_flutter, RN react-native-webview)
  • Data models: CollectDataAction{url, schema}, removed CollectDataField/CollectDataFieldType
  • AI prompts: CollectingData state → WebViewDataCollection, added onWebViewComplete()/onWebViewError() handlers
  • Overview FAQ: Updated answers + added new FAQs (see below)

Platform-Specific Bridge Names

Platform WebView Library JS Bridge Name
Kotlin android.webkit.WebView AndroidWallet
Swift WKWebView payDataCollectionComplete
Flutter webview_flutter (4.10+) ReactNativeWebView (via JS bridge)
React Native react-native-webview (13.16+) ReactNativeWebView (native)

Updates since last revision

Added three FAQ entries to payments/wallets/overview.mdx:

  1. "What is the WebView data collection approach?" — appended a recommendation to use WebView over custom native UI, noting that data collection requirements are regulation-driven and the hosted form is maintained centrally.
  2. "Can wallets implement custom UI instead of the WebView form?" — new FAQ explaining that custom UI is possible but wallets assume responsibility for keeping forms in sync, and must ensure users accept WalletConnect T&C and Privacy Policy. References the collect_data schema.
  3. "Can wallets pre-fill customer information?" — new FAQ confirming pre-fill is supported, with a note that wallets skipping the WebView must ensure T&C and Privacy Policy acceptance.

Review & Testing Checklist for Human

  • Verify the three new FAQ entries in payments/wallets/overview.mdx render correctly (AccordionGroup items) — run mint dev and check the overview page
  • Confirm the T&C and Privacy Policy links work: https://walletconnect.com/terms and https://walletconnect.com/privacy
  • Review FAQ wording for consistency with the rest of the WebView documentation (especially the custom UI vs. WebView trade-off messaging)

Test Plan

  1. Run mint dev locally
  2. Navigate to /payments/wallets/overview and expand each FAQ accordion
  3. Click the T&C and Privacy Policy links to verify they resolve correctly

Notes

Replace native field-by-field data collection with WebView-based approach
for Information Capture (IC). The CollectDataAction model now uses a `url`
field pointing to a WalletConnect-hosted form. When present, wallets display
it in a WebView instead of building native forms. The WebView handles form
rendering, validation, T&C acceptance, and communicates completion via JS
bridge messages (IC_COMPLETE / IC_ERROR).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…refill examples

- Remove PaymentResultInfo from ConfirmPaymentResponse across all docs
- Add resultInfo: PaymentResultInfo? to PaymentOptionsResponse in all platform docs and AI prompts
- Add pobAddress field to all prefill data examples
- Document that schema's required list can be used to determine prefill fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove Sdk-Name/Sdk-Version/Sdk-Platform headers (internal SDK use only)
- Remove Client-Id header (internal use only)
- Add optional App-Id header to all endpoints
- Add url and schema fields to CollectData schema
- Add account field to PaymentOption schema
- Add networkIconUrl to AmountDisplay schema
- Update confirm endpoint description (commitment point)
- Update API-first page with Api-Key prerequisite and Sdk-* warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nfirm example

- Reorder API-first flow diagram: data collection now happens before option selection
- Remove Sdk-* warning block from API-first page
- Add tosConfirmed field to confirm payment request example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… comments

- Remove "(no collectedData when WebView is used)" from confirm payment step comments
- Remove "(Optional)" from Flutter AI prompt WebView step heading
- Add keyboard behavior testing to WebView best practices
- Fix prefill URL construction to handle existing query parameters using
  platform-native URL builders (Uri.buildUpon for Kotlin, URLComponents
  for Swift, Uri.replace for Flutter, separator check for JS/RN)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion

Co-Authored-By: mirna@reown.com <mirna@reown.com>
@devin-ai-integration devin-ai-integration bot changed the title Add WebView-based data collection docs docs: add WebView-based data collection docs Feb 10, 2026
@jakubuid jakubuid requested a review from mirnab0 February 10, 2026 13:09
Based on patterns from the WCPay SDK (Yttrium): payment link detection,
action resolution, result submission, polling, retry strategy, data
collection, and expiration handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jakubuid and others added 2 commits February 11, 2026 09:01
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
@jakubuid jakubuid merged commit a7882a2 into main Feb 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants